package com.xq.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xq.entity.UmsRoles;
import com.xq.mapper.UmsRolesMapper;
import com.xq.service.IUmsRolesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wuven
 * @since 2025-05-23
 */
@Service
public class UmsRolesServiceImpl extends ServiceImpl<UmsRolesMapper, UmsRoles> implements IUmsRolesService {

    @Autowired
    private UmsRolesMapper umsRolesMapper;

    @Override
    public String getUserRolesId(String roleName) {
        QueryWrapper<UmsRoles> queryWrapper = new QueryWrapper();
        queryWrapper.eq("role_name", roleName);
        UmsRoles umsRoles = umsRolesMapper.selectOne(queryWrapper);
        return umsRoles.getRoleId();
    }
}
